.class public Lcom/melesta/engine/NativeEngineCallbacks;
.super Ljava/lang/Object;
.source "NativeEngineCallbacks.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "NativeEngineCallbacks"

.field private static mThis:Lcom/melesta/engine/NativeEngineCallbacks;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 7
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static create()V
    .locals 3

    .prologue
    .line 22
    sget-object v1, Lcom/melesta/engine/NativeEngineCallbacks;->mThis:Lcom/melesta/engine/NativeEngineCallbacks;

    if-eqz v1, :cond_0

    .line 23
    const-string v1, "NativeEngineCallbacks"

    const-string v2, "allready created"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 29
    .local v0, packageName:Ljava/lang/String;
    :goto_0
    return-void

    .line 26
    .end local v0           #packageName:Ljava/lang/String;
    :cond_0
    new-instance v1, Lcom/melesta/engine/NativeEngineCallbacks;

    invoke-direct {v1}, Lcom/melesta/engine/NativeEngineCallbacks;-><init>()V

    sput-object v1, Lcom/melesta/engine/NativeEngineCallbacks;->mThis:Lcom/melesta/engine/NativeEngineCallbacks;

    .line 27
    invoke-static {}, Lcom/melesta/engine/EngineApp;->getApp()Lcom/melesta/engine/EngineApp;

    move-result-object v1

    invoke-virtual {v1}, Lcom/melesta/engine/EngineApp;->getPackageName()Ljava/lang/String;

    move-result-object v0

    .line 28
    .restart local v0       #packageName:Ljava/lang/String;
    invoke-static {v0}, Lcom/melesta/engine/NativeEngineCallbacks;->onCreate(Ljava/lang/String;)V

    goto :goto_0
.end method

.method static destroy()V
    .locals 2

    .prologue
    .line 32
    sget-object v0, Lcom/melesta/engine/NativeEngineCallbacks;->mThis:Lcom/melesta/engine/NativeEngineCallbacks;

    if-nez v0, :cond_0

    .line 33
    const-string v0, "NativeEngineCallbacks"

    const-string v1, "allready destroyed"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 38
    :goto_0
    return-void

    .line 36
    :cond_0
    const/4 v0, 0x0

    sput-object v0, Lcom/melesta/engine/NativeEngineCallbacks;->mThis:Lcom/melesta/engine/NativeEngineCallbacks;

    .line 37
    invoke-static {}, Lcom/melesta/engine/NativeEngineCallbacks;->onDestroy()V

    goto :goto_0
.end method

.method private static native getBackupName()Ljava/lang/String;
.end method

.method static getGameBackupName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 41
    invoke-static {}, Lcom/melesta/engine/NativeEngineCallbacks;->getBackupName()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getGamePromocode()Ljava/lang/String;
    .locals 1

    .prologue
    .line 50
    invoke-static {}, Lcom/melesta/engine/NativeEngineCallbacks;->getPromocode()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static native getPromocode()Ljava/lang/String;
.end method

.method private static native onCreate(Ljava/lang/String;)V
.end method

.method private static native onDestroy()V
.end method

.method private static native onPromocodeChecked(I)V
.end method

.method static promocodeChecked(I)V
    .locals 0
    .parameter "res"

    .prologue
    .line 46
    invoke-static {p0}, Lcom/melesta/engine/NativeEngineCallbacks;->onPromocodeChecked(I)V

    .line 47
    return-void
.end method
